//
//  Tea.m
//  OC1_类和对象课后作业
//
//  Created by dllo on 15/10/22.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "Tea.h"

@implementation Tea

-(id)init
{

    _name = @"绿茶";
    _color = @"绿色";
    _taste = @"清淡";
    [self info];
    return self;

}

-(void)info
{

    NSLog(@"%@ %@ %@", _name, _color, _taste);

}

-(void)drink
{

    NSLog(@"小明正在喝%@的%@", _taste, _name);

}

-(id)initWithName:(NSString *)name color:(NSString *)color taste:(NSString *)taste
{
    _name = name;
    _color = color;
    _taste = taste;
    return self;
}

-(NSString *)name
{
    return _name;
}

-(void)setName:(NSString *)name
{
    _name = name;
}
-(NSString *)color
{
    return _color;
}
-(void)setColor:(NSString *)color
{
    _color = color;
}
-(NSString *)taste
{
    return _taste;
}
-(void)setTaste:(NSString *)taste
{
    _taste = taste;
}

+ (id)teaWithName:(NSString *)name color:(NSString *)color taste:(NSString *)taste
{
    Tea *t = [[Tea alloc] initWithName:name color:color taste:taste];
    return t;
}


@end
